cmake_minimum_required(VERSION 3.15)
project(sourceguard-hook)

set(CMAKE_CXX_STANDARD 14)

<<<<<<< HEAD
include_directories(/home/a/program/azul/include /opt/jdk1.8.0_221/include /opt/jdk1.8.0_221/include/linux)
=======
include_directories(/usr/local/opt/openssl/include /Library/Java/JavaVirtualMachines/jdk-1.8.281.jdk/Contents/Home/include /Library/Java/JavaVirtualMachines/jdk-1.8.281.jdk/Contents/Home/include/darwin)
>>>>>>> 136c7155374ac79adf4365a13d2b60405d2b38e9

add_library(sourceguard SHARED
        sourceguard.cpp
        cpu_id.h
        cpu_id.cpp
        rsa/rsa.cpp
        rsa/rsa.h
        base64/base64.h
        base64/base64.cpp
        org_magicwall_universal_core_BytecodeDecrypt.h
        com_fenquen_sourceguard_dencrypt_Dencrypt.h)
add_executable(rsa_test rsa/rsa_test.cpp rsa/rsa.h rsa/rsa.cpp base64/base64.cpp base64/base64.h)


find_package(OpenSSL REQUIRED)
if (OPENSSL_FOUND)
    include_directories(${OPENSSL_INCLUDE_DIRS})
    message(STATUS "OpenSSL Found!")
endif ()

target_link_libraries(rsa_test OpenSSL::Crypto OpenSSL::SSL)

<<<<<<< HEAD
#[[set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lopenssl") ]]
=======
#[[set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lopenssl")]]
>>>>>>> 136c7155374ac79adf4365a13d2b60405d2b38e9
